\(\int x^2 \sqrt {a+a \cosh (x)} \, dx\) [128]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F(-2)]
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 53 \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=-8 x \sqrt {a+a \cosh (x)}+16 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right )+2 x^2 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right ) \]

[Out]

-8*x*(a+a*cosh(x))^(1/2)+16*(a+a*cosh(x))^(1/2)*tanh(1/2*x)+2*x^2*(a+a*cosh(x))^(1/2)*tanh(1/2*x)

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3400, 3377, 2717} \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=2 x^2 \tanh \left (\frac {x}{2}\right ) \sqrt {a \cosh (x)+a}-8 x \sqrt {a \cosh (x)+a}+16 \tanh \left (\frac {x}{2}\right ) \sqrt {a \cosh (x)+a} \]

[In]

Int[x^2*Sqrt[a + a*Cosh[x]],x]

[Out]

-8*x*Sqrt[a + a*Cosh[x]] + 16*Sqrt[a + a*Cosh[x]]*Tanh[x/2] + 2*x^2*Sqrt[a + a*Cosh[x]]*Tanh[x/2]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3400

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(2*a)^IntPart[n]
*((a + b*Sin[e + f*x])^FracPart[n]/Sin[e/2 + a*(Pi/(4*b)) + f*(x/2)]^(2*FracPart[n])), Int[(c + d*x)^m*Sin[e/2
 + a*(Pi/(4*b)) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {a+a \cosh (x)} \text {sech}\left (\frac {x}{2}\right )\right ) \int x^2 \cosh \left (\frac {x}{2}\right ) \, dx \\ & = 2 x^2 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right )-\left (4 \sqrt {a+a \cosh (x)} \text {sech}\left (\frac {x}{2}\right )\right ) \int x \sinh \left (\frac {x}{2}\right ) \, dx \\ & = -8 x \sqrt {a+a \cosh (x)}+2 x^2 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right )+\left (8 \sqrt {a+a \cosh (x)} \text {sech}\left (\frac {x}{2}\right )\right ) \int \cosh \left (\frac {x}{2}\right ) \, dx \\ & = -8 x \sqrt {a+a \cosh (x)}+16 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right )+2 x^2 \sqrt {a+a \cosh (x)} \tanh \left (\frac {x}{2}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.58 \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=8 \sqrt {a (1+\cosh (x))} \left (-x+\frac {1}{4} \left (8+x^2\right ) \tanh \left (\frac {x}{2}\right )\right ) \]

[In]

Integrate[x^2*Sqrt[a + a*Cosh[x]],x]

[Out]

8*Sqrt[a*(1 + Cosh[x])]*(-x + ((8 + x^2)*Tanh[x/2])/4)

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.94

method result size
risch \(\frac {\sqrt {2}\, \sqrt {a \left ({\mathrm e}^{x}+1\right )^{2} {\mathrm e}^{-x}}\, \left (x^{2} {\mathrm e}^{x}-x^{2}-4 x \,{\mathrm e}^{x}-4 x +8 \,{\mathrm e}^{x}-8\right )}{{\mathrm e}^{x}+1}\) \(50\)

[In]

int(x^2*(a+a*cosh(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2^(1/2)*(a*(exp(x)+1)^2*exp(-x))^(1/2)/(exp(x)+1)*(x^2*exp(x)-x^2-4*x*exp(x)-4*x+8*exp(x)-8)

Fricas [F(-2)]

Exception generated. \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(x^2*(a+a*cosh(x))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

Sympy [F]

\[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=\int x^{2} \sqrt {a \left (\cosh {\left (x \right )} + 1\right )}\, dx \]

[In]

integrate(x**2*(a+a*cosh(x))**(1/2),x)

[Out]

Integral(x**2*sqrt(a*(cosh(x) + 1)), x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.25 \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=-{\left (\sqrt {2} \sqrt {a} x^{2} + 4 \, \sqrt {2} \sqrt {a} x - {\left (\sqrt {2} \sqrt {a} x^{2} - 4 \, \sqrt {2} \sqrt {a} x + 8 \, \sqrt {2} \sqrt {a}\right )} e^{x} + 8 \, \sqrt {2} \sqrt {a}\right )} e^{\left (-\frac {1}{2} \, x\right )} \]

[In]

integrate(x^2*(a+a*cosh(x))^(1/2),x, algorithm="maxima")

[Out]

-(sqrt(2)*sqrt(a)*x^2 + 4*sqrt(2)*sqrt(a)*x - (sqrt(2)*sqrt(a)*x^2 - 4*sqrt(2)*sqrt(a)*x + 8*sqrt(2)*sqrt(a))*
e^x + 8*sqrt(2)*sqrt(a))*e^(-1/2*x)

Giac [F]

\[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=\int { \sqrt {a \cosh \left (x\right ) + a} x^{2} \,d x } \]

[In]

integrate(x^2*(a+a*cosh(x))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*cosh(x) + a)*x^2, x)

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96 \[ \int x^2 \sqrt {a+a \cosh (x)} \, dx=-\frac {\sqrt {a+a\,\left (\frac {{\mathrm {e}}^{-x}}{2}+\frac {{\mathrm {e}}^x}{2}\right )}\,\left (8\,x-16\,{\mathrm {e}}^x-2\,x^2\,{\mathrm {e}}^x+8\,x\,{\mathrm {e}}^x+2\,x^2+16\right )}{{\mathrm {e}}^x+1} \]

[In]

int(x^2*(a + a*cosh(x))^(1/2),x)

[Out]

-((a + a*(exp(-x)/2 + exp(x)/2))^(1/2)*(8*x - 16*exp(x) - 2*x^2*exp(x) + 8*x*exp(x) + 2*x^2 + 16))/(exp(x) + 1
)